//
//  FirstViewController.m
//  07-UIViewControllerLifCycle
//
//  Created by GivenBmli on 16/7/22.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "FirstViewController.h"

@interface FirstViewController ()

@end

@implementation FirstViewController
#pragma make - life Cycle
//loadView viewDidLoad viewWillApper
// 以上三个方法,会插在上一个视图控制器的viewWillDisappear 与 viewDidDisappear 中间 
- (void)loadView{
    [super loadView];
    NSLog(@"%@------%s",[self class],__FUNCTION__);
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    NSLog(@"%@------%s",[self class],__FUNCTION__);
    self.view.backgroundColor = [UIColor colorWithRed:1.000 green:0.000 blue:0.502 alpha:1.000];
   }

// 视图将要出现,就会调用
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    NSLog(@"%@------%s",[self class],__FUNCTION__);
}


//视图完全出现时,就会调用
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    NSLog(@"%@------%s",[self class],__FUNCTION__);
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    
    NSLog(@"%@------%s",[self class],__FUNCTION__);
}

// 视图完全出现就会调用
- (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    NSLog(@"%@------%s",[self class],__FUNCTION__);
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
